<!-- 搜索人员 -->
<template>
	<view class="">
		<u-popup class="form-popup" mode="right" :show="showPopup" @open="open" :zIndex="998">
			<view>
				<u-navbar :title="pageTitle" @leftClick="close" style="color: #fff;" bgColor="#1E6FFF"></u-navbar>
				<view :style="'height:' + getSafeAreaTop() + 'px'" style="color: red; width: 750rpx;"></view>

				<!-- #ifdef APP-PLUS -->
				<view style="height: 40px;"></view>
				<!-- #endif -->
				<slot></slot>
			</view>
		</u-popup>
	</view>
</template>

<script>
export default {
	data() {
		return {
			title: '', // 选中的标题名称
			isClick: false,
			// showPopup: false
		}
	},
	model: {
		prop: 'value',
		event: 'change',
	},
	props: {
		pageTitle: {
			type: String,
			default: '标题'
		},
		showPopup: {
			default: false
		}
	},
	watch: {},
	computed: {},
	methods: {
		open() {
			this.$emit('open', true)
		},
		close() {
			this.$emit('close', true)
		},
		// 获取safeArea
		getSafeAreaTop() {
			var top = 44
			return top
		},
		// 获取safeArea
		getScorollHeight() {
			let height = uni.getStorageSync('getSystemInfo').screenHeight - (uni.getStorageSync('getSystemInfo')
				?.safeArea?.top || 0) - (uni.getStorageSync('getSystemInfo')?.statusBarHeight || 0) - 44 - 32
			return height
		},
	},
	mounted() { },
}
</script>

<style lang="scss" scoped>
::v-deep .u-icon__icon {
	color: #fff !important;
}

::v-deep .u-navbar__content__title {
	color: #fff;
}

// 处理 u-popup 组件层级过高,将 uni.showToast 覆盖问题
/deep/ .u-transition.u-fade-enter-to.u-fade-enter-active {
	z-index: 997 !important;
}
</style>